Title: x86assembly - class3 - instructions and references video notes

Q: The [...] instruction copies the second operand (source operand) to the first operand (destination operand). The destination operand must be a register or memory location.
A: mov
url: https://www.felixcloutier.com/x86/mov
Topic: instructions

Q: The [...] instruction performs integer addition. It evaluates the result for both signed and unsigned integer operands and sets the CF and OF flags to indicate carry/overflow respectively. Two memory operands cannot be used in one [...] instruction.
A: add; add
url: https://www.felixcloutier.com/x86/add
Topic: instructions

Q: The [...] instruction subtracts the second (source) operand from the first (destination) operand and stores the result in the destination operand. Two memory operands cannot be used in one instruction.
[...] evaluates results for both signed and unsigned integer operands and sets the OF and CF flags to indicate carry or overflow in the signed or unsigned result, respectively.
A: sub; Sub
url: https://www.felixcloutier.com/x86/sub
Topic: instructions

Q: When data is MOV ed /copied in the regular manner, only the size of that data is changed and any extra space remains as it was. The [...] instruction (move with [...]-[...]) moves the small data into a larger register and extends the extra bits to zero.
A: MOVZX; zero; extend
url: https://www.felixcloutier.com/x86/movzx
Topic: assignment

Q: The [...] instruction will move small data into a larger register and extend the sign bit to the unspecified bit. The target can only be a 32 bit or 16 bit register.
A: MOVSX
url: https://www.felixcloutier.com/x86/movsx:movsxd
Topic: assignment

Q: The [...] instruction is "Exchange Register/Memory with Register". It exchanges the contents of the destination (first) and source (second) operands. At least one of the operands must be a [...].
A: XCHG; register
Extra: Extra note: If a memory operand is referenced, the processor locking protocol is automatically implemented for the duration of the exchange operation. This is useful for semaphores, a signaling mechanism by which only one process is allowed to access a critical section of memory at a time.
url: https://www.felixcloutier.com/x86/xchg
Topic: assignment

Q: Generally, the intended size of a data item can be inferred from the code instruction where it's referenced, especially if the destination operand is a register, which has a fixed size. In other cases, like dealing with arrays, the assembler needs to be told explicitly what size to move. To accomplish that, a size directive is used, which consists of a data size and the directive word [...].
 mov BYTE [...] [ebx], 2    ; move 2 as 00000010 (byte) to memory location stored at EBX
 mov WORD [...] [ebx], 2	  ; move 2 as 0000000000000010 (word) to that location
A: PTR; PTR; PTR
url: https://aaronbloomfield.github.io/pdr/book/x86-32bit-asm-chapter.pdf#page=4
Topic: size directive

Q: [...] and [...] will increment or decrement a register or memory location by 1 and set flags in EFLAGS.
A: INC; DEC
url: https://www.felixcloutier.com/x86/inc
Topic: instructions

Q: The [...] instruction reverses the sign of a number using twos compliment, setting flags.
A: NEG
url: https://www.felixcloutier.com/x86/neg
Topic: instructions

Q: The [...] operator returns the offset of a data label, which is the distance, in [...], of the label from the beginning of the .data [...].
A: OFFSET; bytes; segment
Topic: addresses

Q: The [...] operator returns the size, in bytes, of a single element of a variable.
A: TYPE
Topic: operators

Q: The [...] operator counts the number of elements in an array, defined by the values appearing on the same line as its label.
A: LENGTHOF
Topic: operators

Q: The [...] operator returns a value equivalent to multiplying LENGTHOF by TYPE
A: SIZEOF
Topic: operators

Q: The <size> [...] operator overrides the declared size of an operand.
A: PTR
Topic: operators

Q: Conditional jumps evaluate flags, typically set by the [...] instruction, and jump to another location in code if the flags match some comparison.
For example, [...] jumps if the compared operands were equal.
A: CMP; JE
url: http://ref.x86asm.net/coder32.html#x74
Topic: instructions, conditionals